Class EquatableEqualityComparer<T>

A default equalityComparer for a type, T, implementing . The equalityComparer forwards calls to GetHashCode and Equals to the methods on T. The point is that it is Equals(T) and not Equals(object) that is called. This will save a boxing/unboxing pair if T is a value type and in general a runtime type check.
Type parameters:
T
Constraints:
T : System.IEquatable<T>

Implements

System.Collections.Generic.IEqualityComparer<T>

Bases

object

Property overview

Default

Method overview

Equals(T item1, T item2) ,
Equals(object obj), Inherited from object ,
Finalize(), Inherited from object ,
GetHashCode(T item) ,
GetHashCode(), Inherited from object ,
GetType(), Inherited from object ,
MemberwiseClone(), Inherited from object ,
ToString(), Inherited from object

Property details

S EquatableEqualityComparer<T> DefaultAccess: Read-Only

Value:

Method details

F bool Equals(T item1, T item2)
Returns:
Parameters:
item1:
item2:
F int GetHashCode(T item)
Returns:
Parameters:
item: